package com.mychart.entity.mongo;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class ChartRecord {

    String id;
    String from;
    String to;
    String content;
    @JsonFormat(pattern = "yyyy-MM-dd hh:mm")
    Date date;

    public ChartRecord(String from, String to, String content, Date date) {
        this.from = from;
        this.to = to;
        this.content = content;
        this.date = date;
    }
}
